import { getCaseType, getDeptMoney } from '@/api/statistics'

export default defineStore('useStatistics', {
  state: () => ({}),
  getters: {},
  actions: {
    async getCaseType() {
      let url = $globalRequestUrl({
        url: getCaseType,
      })

      try {
        const rep = await $globalRequest(url, {}, { method: 'GET' })
        return rep
      } catch (error) {
        return error
      }
    },
    async getDeptMoney() {
      let url = $globalRequestUrl({
        url: getDeptMoney,
      })

      try {
        const rep = await $globalRequest(url, {}, { method: 'GET' })
        return rep
      } catch (error) {
        return error
      }
    },
  },
})
